@extends('admin.base.index')
@section('content')
<div class="block-area" id="tableStriped">
                    <h3 class="block-title">米聊列表主页</h3>
                    <form action="" method="post" name="myform">
				    	<input type="hidden" name="_token" value="{{ csrf_token() }}">
				    	<input type="hidden" name="_method" value="DELETE">
				    </form>
                    <div class="table-responsive overflow">
                        <table class="tile table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <td align="center">图片id</td>
                                    <td align="center">大图轮播</td>
                                    <td align="center">小图</td>
                                    <td align="center">操作</td>
                                </tr>
                            </thead>
                            <tbody>
                             @foreach($list as $v)
                                <tr>
                                    <td align="center">{{ $v->id }}</td>
                                    <td align="center"><img src="{{ url('menu') }}/{{ $v->maxpic }}" width="60px">
                                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    	{{ $v->maxpic }}
                                    </td>
                                    <td align="center"><img src="{{ url('menu') }}/{{ $v->minpic }}" width="40px" height="30px">
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        {{ $v->minpic }}
                                    </td>
                                    <td align="center">
                    					<a href="javascript:doDel({{ $v->id }})">
                    						<button class="btn-info">删除</button>
                    					</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    					<a href="/admin/miliao/{{ $v->id }}/edit">
                    						<button class="btn-info">修改</button>
                    					</a>
                   			 		</td>
                                </tr>
                             @endforeach
                            </tbody>
                        </table>
                        <script type="text/javascript">
				        	function doDel(id)
				        	{
				        		if(confirm('确定要删除吗???')){
				        			var form = document.myform;
				        			form.action = '/admin/miliao/'+id;
				        			form.submit();
				        		}
				        	}
       					</script>
                    </div>
                </div>
@stop